<template>
  <div class="form">
    <div class="ipt-form">
      <div class="form-top"><h2>订单列表</h2></div>
      <hr />
      <div class="form-buttom">
        <div v-for="(el, idx) in order" :key="idx">
          {{ JSON.parse(el.goods_info) }}
          <hr />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  created() {
    this.$store.dispatch("order");
  },
  computed: {
    ...mapState({
      order: (state) => state.order,
    }),
  },
};
</script>

<style lang="scss" scoped>
.form {
  margin-top: 80px;
  padding: 100px;
  padding-bottom: 240px;
  background-color: #f4f4f4;
  border-top: 1px solid rgb(224, 224, 224);
  .ipt-form {
    margin: 0 auto;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 10px 10px 5px #888888;
  }
}
</style>